﻿<Window x:Class="ELearning.Wpf.UI.wndCreateTest"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:UI="clr-namespace:ELearning.Wpf.UI"
        Title="wndCreateTest" Height="589" Width="623" WindowStartupLocation="CenterScreen">
    <Grid>
        <TextBox Height="23" HorizontalAlignment="Left" Margin="28,40,0,0" Name="tbTestName" VerticalAlignment="Top" Width="247" Text=""/>
        <Label Content="Назва тесту:" Height="28" HorizontalAlignment="Left" Margin="28,14,0,0" Name="label1" VerticalAlignment="Top" />
        <Button Content="Додати питання" Height="23" HorizontalAlignment="Left" Margin="95,99,0,0" Name="btAddQuestion" VerticalAlignment="Top" Width="103" Click="btAddQuestion_Click" />
        <Label Content="1/1" Height="28" HorizontalAlignment="Left" Margin="28,95,0,0" Name="lbCounter" VerticalAlignment="Top" Width="70" FontSize="14" />
        <Button Content="&lt;" Height="23" HorizontalAlignment="Left" Margin="221,99,0,0" Name="btPrevQuestion" VerticalAlignment="Top" Width="29" Click="btPrevQuestion_Click" />
        <Button Content="&gt;" Height="23" HorizontalAlignment="Left" Margin="265,100,0,0" Name="btNextQuestion" VerticalAlignment="Top" Width="29" Click="btNextQuestion_Click" />
        <Button Content="Видалити питання" Height="23" HorizontalAlignment="Left" Margin="320,100,0,0" Name="btDeleceQuestion" VerticalAlignment="Top" Width="110" />
        <Rectangle Margin="33,153,20,49" Name="rectangle1" Stroke="Black" />
        <TextBox Height="46" HorizontalAlignment="Left" Margin="50,187,0,0" Name="tbQuestionText" VerticalAlignment="Top" Width="497" TextChanged="tbQuestionText_TextChanged" />
        <Label Content="Запитання:" Height="28" HorizontalAlignment="Left" Margin="50,158,0,0" Name="label3" VerticalAlignment="Top" />
        <Button Content="Зберiгти" Height="23" HorizontalAlignment="Left" Margin="506,515,0,0" Name="btSave" VerticalAlignment="Top" Width="75" Click="btSave_Click" />
        <Button Content="Додати вiдповiдь" Height="23" HorizontalAlignment="Right" Margin="0,257,54,0" Name="btAddAnswer" VerticalAlignment="Top" Width="106" Click="btAddAnswer_Click" />
        <TextBox Height="23" HorizontalAlignment="Left" Margin="50,258,0,0" Name="tbNewAnswerText" VerticalAlignment="Top" Width="380" />
        <ListBox Height="191" HorizontalAlignment="Left" Margin="50,287,0,0" Name="lbAnswers" VerticalAlignment="Top" Width="497" ItemsSource="{Binding}">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <Grid Width="470" >
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="20"/>
                                <ColumnDefinition Width="350"/>
                                <ColumnDefinition Width="90"/>
                            </Grid.ColumnDefinitions>
                            <CheckBox Width="200" Margin="0, 5,0,0" Grid.Column="0" IsChecked="{Binding IsCorrect}"></CheckBox>
                            <TextBox  Margin="0, 5,0,0" Grid.Column="1" Text="{Binding Text, Mode=TwoWay}" />
                            <Button Content="-" Margin="0, 5,0,0" Width="90" Grid.Column="2" Click="RemoveItemClick" Tag="{Binding}"></Button>

                        </Grid>
                    </DataTemplate>
                </ListBox.ItemTemplate>
        </ListBox>
        <Button Content="Видалити тест" Height="23" HorizontalAlignment="Left" Margin="492,39,0,0" Name="btDeleteTest" VerticalAlignment="Top" Width="89" Click="btDeleteTest_Click" />
    </Grid>
</Window>
